package com.gsp.boot.controller;

import com.gsp.boot.bean.ConfigOneBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties(value = {ConfigOneBean.class})
public class MyOneController {
    @Autowired
    @Qualifier(value="configOneBean")
    private ConfigOneBean oneBean;

    @RequestMapping("my_one_info")
    public String myInfo() {
        return "max:" + oneBean.getMax() + "  value:" + oneBean.getValue() +
                "greeting:" + oneBean.getGreeting() + "  uuid:" + oneBean.getUuid();
    }
}
